Optimal. Leaf size=234 \[ -\frac{\left (\sqrt{a} B+A \sqrt{c}\right ) \tan ^{-1}\left (\sqrt{3}-\frac{2 \sqrt [4]{c} x}{\sqrt [4]{a}}\right )}{2 a^{3/4} c^{3/4}}+\frac{\left (\sqrt{a} B+A \sqrt{c}\right ) \tan ^{-1}\left (\frac{2 \sqrt [4]{c} x}{\sqrt [4]{a}}+\sqrt{3}\right )}{2 a^{3/4} c^{3/4}}-\frac{\left (A-\frac{\sqrt{a} B}{\sqrt{c}}\right ) \log \left (-\sqrt{3} \sqrt [4]{a} \sqrt [4]{c} x+\sqrt{a}+\sqrt{c} x^2\right )}{4 \sqrt{3} a^{3/4} \sqrt [4]{c}}+\frac{\left (A-\frac{\sqrt{a} B}{\sqrt{c}}\right ) \log \left (\sqrt{3} \sqrt [4]{a} \sqrt [4]{c} x+\sqrt{a}+\sqrt{c} x^2\right )}{4 \sqrt{3} a^{3/4} \sqrt [4]{c}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.171647, antiderivative size = 234, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 5, integrand size = 32, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.156, Rules used = {1169, 634, 617, 204, 628} \[ -\frac{\left (\sqrt{a} B+A \sqrt{c}\right ) \tan ^{-1}\left (\sqrt{3}-\frac{2 \sqrt [4]{c} x}{\sqrt [4]{a}}\right )}{2 a^{3/4} c^{3/4}}+\frac{\left (\sqrt{a} B+A \sqrt{c}\right ) \tan ^{-1}\left (\frac{2 \sqrt [4]{c} x}{\sqrt [4]{a}}+\sqrt{3}\right )}{2 a^{3/4} c^{3/4}}-\frac{\left (A-\frac{\sqrt{a} B}{\sqrt{c}}\right ) \log \left (-\sqrt{3} \sqrt [4]{a} \sqrt [4]{c} x+\sqrt{a}+\sqrt{c} x^2\right )}{4 \sqrt{3} a^{3/4} \sqrt [4]{c}}+\frac{\left (A-\frac{\sqrt{a} B}{\sqrt{c}}\right ) \log \left (\sqrt{3} \sqrt [4]{a} \sqrt [4]{c} x+\sqrt{a}+\sqrt{c} x^2\right )}{4 \sqrt{3} a^{3/4} \sqrt [4]{c}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1169
Rule 634
Rule 617
Rule 204
Rule 628
Rubi steps
\begin{align*} \int \frac{A+B x^2}{a-\sqrt{a} \sqrt{c} x^2+c x^4} \, dx &=\frac{\int \frac{\frac{\sqrt{3} \sqrt [4]{a} A}{\sqrt [4]{c}}-\left (A-\frac{\sqrt{a} B}{\sqrt{c}}\right ) x}{\frac{\sqrt{a}}{\sqrt{c}}-\frac{\sqrt{3} \sqrt [4]{a} x}{\sqrt [4]{c}}+x^2} \, dx}{2 \sqrt{3} a^{3/4} \sqrt [4]{c}}+\frac{\int \frac{\frac{\sqrt{3} \sqrt [4]{a} A}{\sqrt [4]{c}}+\left (A-\frac{\sqrt{a} B}{\sqrt{c}}\right ) x}{\frac{\sqrt{a}}{\sqrt{c}}+\frac{\sqrt{3} \sqrt [4]{a} x}{\sqrt [4]{c}}+x^2} \, dx}{2 \sqrt{3} a^{3/4} \sqrt [4]{c}}\\ &=\frac{\left (B+\frac{A \sqrt{c}}{\sqrt{a}}\right ) \int \frac{1}{\frac{\sqrt{a}}{\sqrt{c}}-\frac{\sqrt{3} \sqrt [4]{a} x}{\sqrt [4]{c}}+x^2} \, dx}{4 c}+\frac{\left (B+\frac{A \sqrt{c}}{\sqrt{a}}\right ) \int \frac{1}{\frac{\sqrt{a}}{\sqrt{c}}+\frac{\sqrt{3} \sqrt [4]{a} x}{\sqrt [4]{c}}+x^2} \, dx}{4 c}+\frac{\left (\sqrt{a} B-A \sqrt{c}\right ) \int \frac{-\frac{\sqrt{3} \sqrt [4]{a}}{\sqrt [4]{c}}+2 x}{\frac{\sqrt{a}}{\sqrt{c}}-\frac{\sqrt{3} \sqrt [4]{a} x}{\sqrt [4]{c}}+x^2} \, dx}{4 \sqrt{3} a^{3/4} c^{3/4}}+\frac{\left (A-\frac{\sqrt{a} B}{\sqrt{c}}\right ) \int \frac{\frac{\sqrt{3} \sqrt [4]{a}}{\sqrt [4]{c}}+2 x}{\frac{\sqrt{a}}{\sqrt{c}}+\frac{\sqrt{3} \sqrt [4]{a} x}{\sqrt [4]{c}}+x^2} \, dx}{4 \sqrt{3} a^{3/4} \sqrt [4]{c}}\\ &=\frac{\left (\sqrt{a} B-A \sqrt{c}\right ) \log \left (\sqrt{a}-\sqrt{3} \sqrt [4]{a} \sqrt [4]{c} x+\sqrt{c} x^2\right )}{4 \sqrt{3} a^{3/4} c^{3/4}}+\frac{\left (A-\frac{\sqrt{a} B}{\sqrt{c}}\right ) \log \left (\sqrt{a}+\sqrt{3} \sqrt [4]{a} \sqrt [4]{c} x+\sqrt{c} x^2\right )}{4 \sqrt{3} a^{3/4} \sqrt [4]{c}}+\frac{\left (\sqrt{a} B+A \sqrt{c}\right ) \operatorname{Subst}\left (\int \frac{1}{-\frac{1}{3}-x^2} \, dx,x,1-\frac{2 \sqrt [4]{c} x}{\sqrt{3} \sqrt [4]{a}}\right )}{2 \sqrt{3} a^{3/4} c^{3/4}}-\frac{\left (\sqrt{a} B+A \sqrt{c}\right ) \operatorname{Subst}\left (\int \frac{1}{-\frac{1}{3}-x^2} \, dx,x,1+\frac{2 \sqrt [4]{c} x}{\sqrt{3} \sqrt [4]{a}}\right )}{2 \sqrt{3} a^{3/4} c^{3/4}}\\ &=-\frac{\left (\sqrt{a} B+A \sqrt{c}\right ) \tan ^{-1}\left (\sqrt{3}-\frac{2 \sqrt [4]{c} x}{\sqrt [4]{a}}\right )}{2 a^{3/4} c^{3/4}}+\frac{\left (\sqrt{a} B+A \sqrt{c}\right ) \tan ^{-1}\left (\sqrt{3}+\frac{2 \sqrt [4]{c} x}{\sqrt [4]{a}}\right )}{2 a^{3/4} c^{3/4}}+\frac{\left (\sqrt{a} B-A \sqrt{c}\right ) \log \left (\sqrt{a}-\sqrt{3} \sqrt [4]{a} \sqrt [4]{c} x+\sqrt{c} x^2\right )}{4 \sqrt{3} a^{3/4} c^{3/4}}+\frac{\left (A-\frac{\sqrt{a} B}{\sqrt{c}}\right ) \log \left (\sqrt{a}+\sqrt{3} \sqrt [4]{a} \sqrt [4]{c} x+\sqrt{c} x^2\right )}{4 \sqrt{3} a^{3/4} \sqrt [4]{c}}\\ \end{align*}
Mathematica [C] time = 0.184857, size = 163, normalized size = 0.7 \[ \frac{\sqrt [4]{-1} \left (\frac{\left (\left (\sqrt{3}-i\right ) \sqrt{a} B-2 i A \sqrt{c}\right ) \tan ^{-1}\left (\frac{(1+i) \sqrt [4]{c} x}{\sqrt{\sqrt{3}-i} \sqrt [4]{a}}\right )}{\sqrt{\sqrt{3}-i}}-\frac{\left (\left (\sqrt{3}+i\right ) \sqrt{a} B+2 i A \sqrt{c}\right ) \tanh ^{-1}\left (\frac{(1+i) \sqrt [4]{c} x}{\sqrt{\sqrt{3}+i} \sqrt [4]{a}}\right )}{\sqrt{\sqrt{3}+i}}\right )}{\sqrt{6} a^{3/4} c^{3/4}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.092, size = 318, normalized size = 1.4 \begin{align*} -{\frac{A\sqrt{3}}{12}\ln \left ( -\sqrt [4]{a}\sqrt [4]{c}x\sqrt{3}+\sqrt{a}+{x}^{2}\sqrt{c} \right ){\frac{1}{\sqrt [4]{c}}}{a}^{-{\frac{3}{4}}}}+{\frac{B\sqrt{3}}{12}\ln \left ( -\sqrt [4]{a}\sqrt [4]{c}x\sqrt{3}+\sqrt{a}+{x}^{2}\sqrt{c} \right ){c}^{-{\frac{3}{4}}}{\frac{1}{\sqrt [4]{a}}}}+{\frac{A}{2}\arctan \left ({ \left ( 2\,x\sqrt{c}-\sqrt{3}\sqrt [4]{c}\sqrt [4]{a} \right ){\frac{1}{\sqrt{\sqrt{a}\sqrt{c}}}}} \right ){\frac{1}{\sqrt{a}}}{\frac{1}{\sqrt{\sqrt{a}\sqrt{c}}}}}+{\frac{B}{2}\arctan \left ({ \left ( 2\,x\sqrt{c}-\sqrt{3}\sqrt [4]{c}\sqrt [4]{a} \right ){\frac{1}{\sqrt{\sqrt{a}\sqrt{c}}}}} \right ){\frac{1}{\sqrt{c}}}{\frac{1}{\sqrt{\sqrt{a}\sqrt{c}}}}}+{\frac{A\sqrt{3}}{12}\ln \left ( \sqrt [4]{a}\sqrt [4]{c}x\sqrt{3}+\sqrt{a}+{x}^{2}\sqrt{c} \right ){\frac{1}{\sqrt [4]{c}}}{a}^{-{\frac{3}{4}}}}-{\frac{B\sqrt{3}}{12}\ln \left ( \sqrt [4]{a}\sqrt [4]{c}x\sqrt{3}+\sqrt{a}+{x}^{2}\sqrt{c} \right ){c}^{-{\frac{3}{4}}}{\frac{1}{\sqrt [4]{a}}}}+{\frac{A}{2}\arctan \left ({ \left ( 2\,x\sqrt{c}+\sqrt{3}\sqrt [4]{c}\sqrt [4]{a} \right ){\frac{1}{\sqrt{\sqrt{a}\sqrt{c}}}}} \right ){\frac{1}{\sqrt{a}}}{\frac{1}{\sqrt{\sqrt{a}\sqrt{c}}}}}+{\frac{B}{2}\arctan \left ({ \left ( 2\,x\sqrt{c}+\sqrt{3}\sqrt [4]{c}\sqrt [4]{a} \right ){\frac{1}{\sqrt{\sqrt{a}\sqrt{c}}}}} \right ){\frac{1}{\sqrt{c}}}{\frac{1}{\sqrt{\sqrt{a}\sqrt{c}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{B x^{2} + A}{c x^{4} - \sqrt{a} \sqrt{c} x^{2} + a}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 7.48679, size = 3245, normalized size = 13.87 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: PolynomialError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]